<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!doctype html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>仿12306管理系统</title>
    <link rel="stylesheet" type="text/css" href="http://localhost:8080/sellticket_war_exploded/back/css/common.css" />
    <link rel="stylesheet" type="text/css" href="http://localhost:8080/sellticket_war_exploded/back/css/main.css" />
</head>

<body>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">仿12306后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a class="on" href="http://localhost:8080/sellticket_war_exploded/back/index.jsp">首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li><a href="#">${loginUser.user_name}</a></li>
                <li><a href="http://localhost:8080/sellticket_war_exploded/user/logout">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <a href="#"><i class="icon-font">&#xe003;</i>常用操作</a>
                    <ul class="sub-menu">
                        <li><a href="../user/getUserByPage?page=1"><i class="icon-font">&#xe008;</i>用户管理</a></li>
                        <li><a href="../station/getStationByPage?page=1"><i class="icon-font">&#xe005;</i>车站管理</a></li>
                        <li><a href="../ticket/getTicketByPage?page=1"><i class="icon-font">&#xe004;</i>车次管理</a></li>
                        <li><a href="../order/getOrderByPage?page=1"><i class="icon-font">&#xe012;</i>订单管理</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="http://localhost:8080/sellticket_war_exploded/back/index.jsp">首页</a><span
                    class="crumb-step">&gt;</span><a class="crumb-name" href="../ticket/getTicketByPage?page=1">车次管理</a><span
                    class="crumb-step">&gt;</span><span>修改车次</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="http://localhost:8080/sellticket_war_exploded/ticket/editTicket" method="post" id="myform" name="myform">
                    <input type="hidden" name="train_id" value="${ticket.train_id}">
                    <table class="insert-tab" width="100%">
                        <tbody>
                        <tr>
                            <th width="120"><i class="require-red">*</i>车次：</th>
                            <td>
                                <input class="common-text required" id="title" name="train_no" value="${ticket.train_no}" type="text">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>始发站：</th>
                            <td>
                                <select name="departure_station">
                                    <c:forEach var="station" items="${stationList}">
                                    <option value="${station.station_id}"${station.station_id==ticket.departure.station_id?'selected':''}>${station.station_name}</option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>终点站：</th>
                            <td>
                                <select name="terminal_station">
                                    <c:forEach var="station" items="${stationList}">
                                        <option value="${station.station_id}"${station.station_id==ticket.terminal.station_id?'selected':''}>${station.station_name}</option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>出发日期：</th>
                            <td>
                                <input class="common-text required" type="date" name="train_date" value="${ticket.train_date}">
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>出发时间：</th>
                            <td>
                                <input class="common-text required" type="time" name="train_time" value="${ticket.train_time}">
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>商务座数量：</th>
                            <td>
                                <input class="common-text required" type="text" name="business_num" value="${ticket.business_num}">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>商务座价格：</th>
                            <td>
                                <input class="common-text required" type="text" name="business_price" value="${ticket.business_price}">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>一等座数量：</th>
                            <td>
                                <input class="common-text required" type="text" name="first_num" value="${ticket.first_num}">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>一等座价格：</th>
                            <td>
                                <input class="common-text required" type="text" name="first_price" value="${ticket.first_price}">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>二等座数量：</th>
                            <td>
                                <input class="common-text required" type="text" name="second_num" value="${ticket.second_num}">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>二等座价格：</th>
                            <td>
                                <input class="common-text required" type="text" name="second_price" value="${ticket.second_price}">
                                <span style="color: red;"></span>
                            </td>
                        </tr>

                        <tr>
                            <th></th>
                            <td>
                                <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                <input class="btn btn6" onClick="history.go(-1)" value="返回" type="button">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>

    </div>
</div>
</body>

</html>
